package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: atp
 * Date: 2022-11-01
 * Time: 17:04
 */
public class BookList {

    private Book[] books = new Book[10];
    public int useSize;//书的数量

    public BookList() {
        books[0] = new Book("三体","刘慈欣",80,"小说");
        books[1] = new Book("西游记","吴承恩",66,"小说");
        books[2] = new Book("红楼梦","曹雪芹",70,"小说");
        this.useSize = 3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    public Book getPos(int pos) {
        return books[pos];
    }

    public void setBooks(Book book,int pos) {
        books[pos] = book;
    }
}
